package com.zx.web.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Entity：用户表 [engine:InnoDB,type:BASE TABLE,catalog:def,schema:file,name:sys_user,auto:].
 * @author Ken
 * @since 2017-04-23 22:41
 * @version v1.0.0
 */
@Entity
@Table(name = "sys_user")
public class SysUser implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 用户登录名*/
    @Id
    @Column(name = "username")
    private String username;// 用户登录名,key:PRI,null:NO,type:varchar,charset:utf8,default: ,maxLen:20

    /** 用户密码，MD5*/
    @Column(name = "password")
    private String password;// 用户密码，MD5,key:,null:NO,type:longtext,charset:utf8,default: ,maxLen:4,294,967,295

    /** 权限，R 或 W 或R/W */
    @Column(name = "auth")
    private String auth;// 权限，R 或 W 或R/W ,key:,null:NO,type:varchar,charset:utf8,default: ,maxLen:64

    /** 记录创建时间*/
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "time_create")
    private Date timeCreate;// 记录创建时间,key:,null:NO,type:datetime,charset:,default: ,maxLen:

    // @Transient
    // private Object transientFiled;

    public SysUser() {}

    /**
     * 获取用户登录名.
     */
    public String getUsername() {
        return this.username;
    }

    /**
     * 设置用户登录名.
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 获取用户密码，MD5.
     */
    public String getPassword() {
        return this.password;
    }

    /**
     * 设置用户密码，MD5.
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获取权限，R 或 W 或R/W .
     */
    public String getAuth() {
        return this.auth;
    }

    /**
     * 设置权限，R 或 W 或R/W .
     */
    public void setAuth(String auth) {
        this.auth = auth;
    }

    /**
     * 获取记录创建时间.
     */
    public Date getTimeCreate() {
        return this.timeCreate;
    }

    /**
     * 设置记录创建时间.
     */
    public void setTimeCreate(Date timeCreate) {
        this.timeCreate = timeCreate;
    }
}
